/*
 * @Author: yanjikun
 * @Date: 2022-06-07 10:12:31
 * @LastEditors: yanjikun
 * @LastEditTime: 2022-06-07 10:32:38
 * @Description: file content
 */

import { treeProps } from 'ant-design-vue/lib/tree/Tree'
import { ExtractPropTypes, PropType } from 'vue'
import { ActionItem } from './types/treeActions'
// import type { TreeProps } from 'ant-design-vue';

export const basicTreeProps = {
  ...treeProps(),
  showContextMenu: {
    type: Boolean as PropType<boolean>,
    default: false,
  },
  menuActions: {
    type: Array as PropType<ActionItem[]>,
    default: () => [],
  },
  dataRequest: {
    type: Function as PropType<(params: any) => Promise<Recordable>>,
  },
}

export type BasicTreeProps = ExtractPropTypes<typeof basicTreeProps>
